const mongoose = require('mongoose');
const Schema = mongoose.Schema;
const ObjectId = Schema.ObjectId;

//用户表
const UserSchema = new Schema({
    //用户名
    name: String,
    //密码
    password: String,
    //管理员
    admin: Boolean,
    //头像
    avatar: String,
    //年龄
    age: Number,
    //手机
    mobile: String,
    //邮件
    email: String,
    //描述
    description: String
}, {collection: 'users'});

const User = mongoose.model('User', UserSchema);
module.exports = User;